//
//  CALayerEx.m
//  yuimall_Iphone
//
//  Created by Gang.Wang on 12-4-26.
//  Copyright (c) 2012年 yuike. All rights reserved.
//

#import "CALayerEx.h"
#import "header.h"

@implementation CALayerEx
@synthesize layerId;

-(void) dealloc
{
    YRelease(layerId)
    
    [super dealloc];
}

-(id) init
{
    self = [super init];
    if (self) {
        self.layerId = [NSString generateUUID];
    }
    
    return self;
}

- (void) setFrame:(CGRect)frame
{
    frame.origin.x = (int)(frame.origin.x + 0.5);
    frame.origin.y = (int)(frame.origin.y + 0.5);
    frame.size.width = (int)(frame.size.width + 0.5);
    frame.size.height = (int)(frame.size.height + 0.5);
    [super setFrame:frame];
}
@end
